<link rel="stylesheet" type="text/css" href="__ADMIN__/lib/extend/checkbox/checkbox.css" media="all">
<div id="checkboxSelect"></div>
<script>
layui.config({
	base: '__ADMIN__' //静态资源所在路径
}).extend({
	checkbox: '/lib/extend/checkbox/checkbox',
}).use(['checkbox'], function () {
	var checkbox = layui.checkbox,
		$ = layui.$

		//先清空原有的数据源
		$("#checkboxSelect").children("li").remove();
	
		//初始化数据源
		checkbox({
			elem: "#checkboxSelect"
			,nodes: {$cols}
			,click: function (node) {
			    console.log("点击", node);
			}
			,del: function (node) {
			    console.log("删除", node);
			    return true;
			}
      });
});
</script>